package com.oppo.dao;

import java.util.List;

import org.apache.commons.dbutils.handlers.BeanListHandler;

import com.oppo.bean.CarMaxBean;
import com.oppo.db.BasicDataOperation;
import com.oppo.tools.MyTools;

public class CarDao {

	public List<CarMaxBean> getCar(CarMaxBean one) {
		String sql = "select c.*,p.product_img,p.PRODUCT_COLOR,p.product_model,p.product_price from product_t p,car_t c  where p.product_id=c.product_id  and c.user_id=?";
		List<CarMaxBean> list = MyTools.getNewInstance(BasicDataOperation.class).queryData(sql,
				new BeanListHandler<>(CarMaxBean.class),one.getUser_id());
		
		return list;
	}
}
